package com.jwthhealth_pub.old.acupressure.view;

import android.app.Activity;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.jwthhealth_pub.R;
import com.jwthhealth_pub.common.view.TitleLayout;
import com.jwthhealth_pub.old.common.Constant;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by Administrator on 2017/1/11.
 */
public class AcupressureActivity extends Activity {
    @BindView(R.id.tv_acupressure_one)
    TextView tvAcupressureOne;
    @BindView(R.id.tv_acupressure_two)
    TextView tvAcupressureTwo;
    @BindView(R.id.tv_acupressure_thi)
    TextView tvAcupressureThi;
    @BindView(R.id.tv_acupressure_for)
    TextView tvAcupressureFor;
    @BindView(R.id.sign_topbar)
    TitleLayout signTopbar;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_acupressure);
        ButterKnife.bind(this);

        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
            getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
        }

        initTop();
    }

    private void initTop() {
        signTopbar.setOnTitleLayoutListener(new TitleLayout.TitleLayoutListener() {
            @Override
            public void leftclick() {
                finish();
            }

            @Override
            public void leftTextClick() {

            }

            @Override
            public void rightclick() {

            }

            @Override
            public void rightTextClick() {

            }
        });
    }

    @OnClick({R.id.tv_acupressure_one, R.id.tv_acupressure_two, R.id.tv_acupressure_thi, R.id.tv_acupressure_for})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.tv_acupressure_one:
                startActivity(new Intent(this, MeridianActivity.class));
                break;
            case R.id.tv_acupressure_two:
                startActivity(new Intent(this, OtherMeridianActivity.class));
                break;
            case R.id.tv_acupressure_thi:
                Intent intent = new Intent(this, SeasonAndSickActivity.class);
                intent.putExtra(Constant.ACUPRESSURETYPE, 1);
                startActivity(intent);
                break;
            case R.id.tv_acupressure_for:
                Intent intent1 = new Intent(this, SeasonAndSickActivity.class);
                intent1.putExtra(Constant.ACUPRESSURETYPE, 2);
                startActivity(intent1);
                break;
        }
    }
}
